namespace CSharpPro._1106;

public class User
{
    private string userName;
    private string password;

    public User(string userName, string password)
    {
        
        userName = this.userName;
        password = this.password;
    }

    public User()
    {
    }

    public string UserName
    {
        get => userName;
        set => userName = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Password
    {
        get => password;
        set => password = value ?? throw new ArgumentNullException(nameof(value));
    }

    public void Add(String userName, String password)
    {
        this.userName = userName ?? throw new ArgumentNullException(nameof(userName));
        this.password = password ?? throw new ArgumentNullException(nameof(password));
    }

    public String toString()
    {
        return "userName:"+userName+" password:"+password;
    }
}